//
// (c) 1997 Molecular Structure Corporation
//
// RESTRICTED RIGHTS NOTICE SHORT FORM (JUNE 1987)
//
// Use, reproduction, or disclosure is subject to restrictions set
// forth in Contract No. W-31-109-ENG-38 and Contract No. 
// 943072401 with the University of Chicago, Operator of
// Argonne National Laboratory.
//
// CUItextnumentry.cc       Initial author: J.W. Pflugrath           9-Apr-1997
//    Class implementation for a user interface widget to adjust textfield 
//    numbers with arrow buttons and virtual keypad.
/*
 *
 * Copyright (C) 2014 Rigaku Americas Corporation
 *                    9009 New Trails Drive
 *                    The Woodlands, TX, USA  77381
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *    * Redistributions of source code must retain the above copyright
 *      notice(s), this list of conditions and the following disclaimer.
 *    * Redistributions in binary form must reproduce the above copyright
 *      notice(s), this list of conditions and the following disclaimer in the
 *      documentation and/or other materials provided with the distribution.
 *    * Neither the name of the Rigaku Americas Corporation nor the 
 *      names of its contributors may be used to endorse or promote products
 *      derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL RIGAKU AMERICAS CORPORATION BE LIABLE 
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA OR PROFITS; OR BUSINESS INTERUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 *
*/

//
// README: Portions of this file are merged at file generation
// time. Edits can be made *only* in between specified code blocks, look
// for keywords <Begin user code> and <End user code>.
//
/////////////////////////////////////////////////////////////
//
// Source file for CUItextnumentry
//
//    This file generated by Builder Xcessory 3.5.1.
//
//    This class is a user interface "component", as described
//    in "Object-Oriented Programming with C++ and OSF/Motif",
//    by Douglas Young, Prentice Hall, 1992. ISBN 0-13-630252-1
//
/////////////////////////////////////////////////////////////
#include <X11/StringDefs.h>
#include <Xm/Form.h>
#include <Xm/Label.h>
#include <Xm/ArrowB.h>
#include <Xm/PushB.h>
#include "CUItextnumentry.h"

//
// Convenience functions from utilities file.
//
extern void RegisterBxConverters(XtAppContext);
extern XtPointer BX_CONVERT(Widget, char *, char *, int, Boolean *);
extern XtPointer DOUBLE(double);
extern XtPointer SINGLE(float);
extern void MENU_POST(Widget, XtPointer, XEvent *, Boolean *);
extern Pixmap XPM_PIXMAP(Widget, char**);
extern void SET_BACKGROUND_COLOR(Widget, ArgList, Cardinal*, Pixel);


// Begin user code block <head> 
#include <Xm/TextF.h>
#include <math.h>
// End user code block <head> 

//
// This table is used to define class resources that are placed
// in app-defaults. This table is necessary so each instance
// of this class has the proper default resource values set.
// This eliminates the need for each instance to have
// its own app-defaults values. This table must be NULL terminated.
//
#if defined(cxx_bx_compat)

Boolean CUItextnumentry::_initAppDefaults = True;
UIAppDefault  CUItextnumentry::_appDefaults[] = {
    {NULL, NULL, NULL, NULL}
};
#endif

// These are default resources for widgets in objects of this class
// All resources will be prepended by *<name> at instantiation,
// where <name> is the name of the specific instance, as well as the
// name of the baseWidget. These are only defaults, and may be overriden
// in a resource file by providing a more specific resource name

String  CUItextnumentry::_defaultCUItextnumentryResources[] = {
        NULL
};

//
// Old style constructor, for compatibility only.
//
CUItextnumentry::CUItextnumentry(const char *name, Widget parent) : 
    UIComponent(name)
{
    
    // Begin user code block <alt_constructor> 
    // End user code block <alt_constructor> 
    create(parent);
}

//
// Class constructor.
//
CUItextnumentry::CUItextnumentry(const char *name) : UIComponent(name)
{
    
    // Begin user code block <constructor> 
  m_apwArrowButtons[ 0] = &_abUp1;
  m_apwArrowButtons[ 1] = &_abUp2;
  m_apwArrowButtons[ 2] = &_abUp3;
  m_apwArrowButtons[ 3] = &_abUp4;
  m_apwArrowButtons[ 4] = &_abUp5;
  m_apwArrowButtons[ 5] = &_abUp6;
  m_apwArrowButtons[ 6] = &_abUp7;
  m_apwArrowButtons[ 7] = &_abUp8;
  m_apwArrowButtons[ 8] = &_abUp9;
  m_apwArrowButtons[ 9] = &_abUp10;
  m_apwArrowButtons[10] = &_abDown1;
  m_apwArrowButtons[11] = &_abDown2;
  m_apwArrowButtons[12] = &_abDown3;
  m_apwArrowButtons[13] = &_abDown4;
  m_apwArrowButtons[14] = &_abDown5;
  m_apwArrowButtons[15] = &_abDown6;
  m_apwArrowButtons[16] = &_abDown7;
  m_apwArrowButtons[17] = &_abDown8;
  m_apwArrowButtons[18] = &_abDown9;
  m_apwArrowButtons[19] = &_abDown10;
  int i;
  for (i = 0; i < 10; i++)
    {
      m_dIncrement[i] = pow((double)10.0, double(5 - i - 1));
    }
    // End user code block <constructor> 
}

//
// Minimal Destructor. Base class destroys widgets.
//
CUItextnumentry::~CUItextnumentry() 
{
    
    // Begin user code block <destructor> 
    // End user code block <destructor> 
    delete _clientDataStructs;
}

//
// Handle creation of all widgets in the class.
//
void CUItextnumentry::create(Widget parent) 
{
    Arg      args[256];
    Cardinal ac=0;
    Boolean  argok=False;
    
    //
    // Load any class-defaulted resources for this object.
    //
    setDefaultResources(parent, _defaultCUItextnumentryResources);
    
#if defined(cxx_bx_compat)
    //
    // Setup app-defaults fallback table if not already done.
    //
    if (_initAppDefaults)
    {
        initAppDefaults(parent, "CUItextnumentry", _appDefaults);
        _initAppDefaults = False;
    }
    //
    // Now set the app-defaults for this instance.
    //
//+Modify for new UIComponent with BX5.0
//    setAppDefaults(parent, _appDefaults, (const char *)NULL);
    setAppDefaults(parent, _appDefaults, _name, False);
//-
#endif
    
    //
    // Register the converters for the widgets.
    //
    RegisterBxConverters(XtWidgetToApplicationContext(parent)); 
    XtInitializeWidgetClass(xmFormWidgetClass);
    XtInitializeWidgetClass(xmLabelWidgetClass);
    XtInitializeWidgetClass(xmArrowButtonWidgetClass);
    XtInitializeWidgetClass(xmPushButtonWidgetClass);
    
    //
    // Create an unmanaged widget as the top of the hierarchy.
    //
    
    ac = 0;
    XtSetArg(args[ac], XmNautoUnmanage, False); ac++;
    XtSetArg(args[ac], XmNresizePolicy, XmRESIZE_GROW); ac++;
    XtSetArg(args[ac], XmNx, 938); ac++;
    XtSetArg(args[ac], XmNy, 129); ac++;
    XtSetArg(args[ac], XmNwidth, 286); ac++;
    XtSetArg(args[ac], XmNheight, 442); ac++;
    _CUItextnumentry = XmCreateForm(parent,
        _name,
        args, 
        ac);
    
    _w = _CUItextnumentry;
    //
    // Install callback to guard against unexpected widget destruction..
    //
    installDestroyHandler();
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, ".", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 129); ac++;
    XtSetArg(args[ac], XmNy, 0); ac++;
    XtSetArg(args[ac], XmNwidth, 28); ac++;
    XtSetArg(args[ac], XmNheight, 88); ac++;
    _lbDecimal = XmCreateLabel(_CUItextnumentry,
        "lbDecimal",
        args, 
        ac);
    XtManageChild(_lbDecimal);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_UP); ac++;
    XtSetArg(args[ac], XmNx, 260); ac++;
    XtSetArg(args[ac], XmNy, 0); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abUp10 = XmCreateArrowButton(_CUItextnumentry,
        "abUp10",
        args, 
        ac);
    XtManageChild(_abUp10);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abUp10,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_UP); ac++;
    XtSetArg(args[ac], XmNx, 235); ac++;
    XtSetArg(args[ac], XmNy, 0); ac++;
    XtSetArg(args[ac], XmNwidth, 25); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abUp9 = XmCreateArrowButton(_CUItextnumentry,
        "abUp9",
        args, 
        ac);
    XtManageChild(_abUp9);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abUp9,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_UP); ac++;
    XtSetArg(args[ac], XmNx, 209); ac++;
    XtSetArg(args[ac], XmNy, 0); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abUp8 = XmCreateArrowButton(_CUItextnumentry,
        "abUp8",
        args, 
        ac);
    XtManageChild(_abUp8);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abUp8,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_UP); ac++;
    XtSetArg(args[ac], XmNx, 183); ac++;
    XtSetArg(args[ac], XmNy, 0); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abUp7 = XmCreateArrowButton(_CUItextnumentry,
        "abUp7",
        args, 
        ac);
    XtManageChild(_abUp7);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abUp7,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_UP); ac++;
    XtSetArg(args[ac], XmNx, 157); ac++;
    XtSetArg(args[ac], XmNy, 0); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abUp6 = XmCreateArrowButton(_CUItextnumentry,
        "abUp6",
        args, 
        ac);
    XtManageChild(_abUp6);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abUp6,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_UP); ac++;
    XtSetArg(args[ac], XmNx, 103); ac++;
    XtSetArg(args[ac], XmNy, 0); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abUp5 = XmCreateArrowButton(_CUItextnumentry,
        "abUp5",
        args, 
        ac);
    XtManageChild(_abUp5);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abUp5,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_DOWN); ac++;
    XtSetArg(args[ac], XmNx, 260); ac++;
    XtSetArg(args[ac], XmNy, 44); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abDown10 = XmCreateArrowButton(_CUItextnumentry,
        "abDown10",
        args, 
        ac);
    XtManageChild(_abDown10);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abDown10,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_DOWN); ac++;
    XtSetArg(args[ac], XmNx, 235); ac++;
    XtSetArg(args[ac], XmNy, 44); ac++;
    XtSetArg(args[ac], XmNwidth, 25); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abDown9 = XmCreateArrowButton(_CUItextnumentry,
        "abDown9",
        args, 
        ac);
    XtManageChild(_abDown9);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abDown9,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_DOWN); ac++;
    XtSetArg(args[ac], XmNx, 209); ac++;
    XtSetArg(args[ac], XmNy, 44); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abDown8 = XmCreateArrowButton(_CUItextnumentry,
        "abDown8",
        args, 
        ac);
    XtManageChild(_abDown8);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abDown8,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_DOWN); ac++;
    XtSetArg(args[ac], XmNx, 183); ac++;
    XtSetArg(args[ac], XmNy, 44); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abDown7 = XmCreateArrowButton(_CUItextnumentry,
        "abDown7",
        args, 
        ac);
    XtManageChild(_abDown7);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abDown7,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_DOWN); ac++;
    XtSetArg(args[ac], XmNx, 157); ac++;
    XtSetArg(args[ac], XmNy, 44); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abDown6 = XmCreateArrowButton(_CUItextnumentry,
        "abDown6",
        args, 
        ac);
    XtManageChild(_abDown6);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abDown6,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_DOWN); ac++;
    XtSetArg(args[ac], XmNx, 103); ac++;
    XtSetArg(args[ac], XmNy, 44); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abDown5 = XmCreateArrowButton(_CUItextnumentry,
        "abDown5",
        args, 
        ac);
    XtManageChild(_abDown5);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abDown5,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, "RCL", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 72); ac++;
    XtSetArg(args[ac], XmNy, 88); ac++;
    XtSetArg(args[ac], XmNwidth, 71); ac++;
    XtSetArg(args[ac], XmNheight, 71); ac++;
    _pbRecall = XmCreatePushButton(_CUItextnumentry,
        "pbRecall",
        args, 
        ac);
    XtManageChild(_pbRecall);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pbRecall,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, "Del", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 215); ac++;
    XtSetArg(args[ac], XmNy, 88); ac++;
    XtSetArg(args[ac], XmNwidth, 71); ac++;
    XtSetArg(args[ac], XmNheight, 71); ac++;
    _pbDelete = XmCreatePushButton(_CUItextnumentry,
        "pbDelete",
        args, 
        ac);
    XtManageChild(_pbDelete);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pbDelete,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_UP); ac++;
    XtSetArg(args[ac], XmNx, 77); ac++;
    XtSetArg(args[ac], XmNy, 0); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abUp4 = XmCreateArrowButton(_CUItextnumentry,
        "abUp4",
        args, 
        ac);
    XtManageChild(_abUp4);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abUp4,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_DOWN); ac++;
    XtSetArg(args[ac], XmNx, 77); ac++;
    XtSetArg(args[ac], XmNy, 44); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abDown4 = XmCreateArrowButton(_CUItextnumentry,
        "abDown4",
        args, 
        ac);
    XtManageChild(_abDown4);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abDown4,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_DOWN); ac++;
    XtSetArg(args[ac], XmNx, 51); ac++;
    XtSetArg(args[ac], XmNy, 44); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abDown3 = XmCreateArrowButton(_CUItextnumentry,
        "abDown3",
        args, 
        ac);
    XtManageChild(_abDown3);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abDown3,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_UP); ac++;
    XtSetArg(args[ac], XmNx, 51); ac++;
    XtSetArg(args[ac], XmNy, 0); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abUp3 = XmCreateArrowButton(_CUItextnumentry,
        "abUp3",
        args, 
        ac);
    XtManageChild(_abUp3);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abUp3,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, "Cancel", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 0); ac++;
    XtSetArg(args[ac], XmNy, 88); ac++;
    XtSetArg(args[ac], XmNwidth, 72); ac++;
    XtSetArg(args[ac], XmNheight, 71); ac++;
    _pbCancel = XmCreatePushButton(_CUItextnumentry,
        "pbCancel",
        args, 
        ac);
    XtManageChild(_pbCancel);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pbCancel,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, "CLE", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 143); ac++;
    XtSetArg(args[ac], XmNy, 88); ac++;
    XtSetArg(args[ac], XmNwidth, 72); ac++;
    XtSetArg(args[ac], XmNheight, 71); ac++;
    _pbClear = XmCreatePushButton(_CUItextnumentry,
        "pbClear",
        args, 
        ac);
    XtManageChild(_pbClear);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pbClear,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_DOWN); ac++;
    XtSetArg(args[ac], XmNx, 26); ac++;
    XtSetArg(args[ac], XmNy, 44); ac++;
    XtSetArg(args[ac], XmNwidth, 25); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abDown2 = XmCreateArrowButton(_CUItextnumentry,
        "abDown2",
        args, 
        ac);
    XtManageChild(_abDown2);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abDown2,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_UP); ac++;
    XtSetArg(args[ac], XmNx, 26); ac++;
    XtSetArg(args[ac], XmNy, 0); ac++;
    XtSetArg(args[ac], XmNwidth, 25); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abUp2 = XmCreateArrowButton(_CUItextnumentry,
        "abUp2",
        args, 
        ac);
    XtManageChild(_abUp2);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abUp2,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_DOWN); ac++;
    XtSetArg(args[ac], XmNx, 0); ac++;
    XtSetArg(args[ac], XmNy, 44); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abDown1 = XmCreateArrowButton(_CUItextnumentry,
        "abDown1",
        args, 
        ac);
    XtManageChild(_abDown1);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abDown1,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNarrowDirection, XmARROW_UP); ac++;
    XtSetArg(args[ac], XmNx, 0); ac++;
    XtSetArg(args[ac], XmNy, 0); ac++;
    XtSetArg(args[ac], XmNwidth, 26); ac++;
    XtSetArg(args[ac], XmNheight, 44); ac++;
    _abUp1 = XmCreateArrowButton(_CUItextnumentry,
        "abUp1",
        args, 
        ac);
    XtManageChild(_abUp1);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_abUp1,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, ":::t\"E\":t\"n\":t\"t\":t\"e\"\"r\"", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 215); ac++;
    XtSetArg(args[ac], XmNy, 301); ac++;
    XtSetArg(args[ac], XmNwidth, 71); ac++;
    XtSetArg(args[ac], XmNheight, 141); ac++;
    _pbEnter = XmCreatePushButton(_CUItextnumentry,
        "pbEnter",
        args, 
        ac);
    XtManageChild(_pbEnter);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pbEnter,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, ":::t\"+\"\"-\"", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 215); ac++;
    XtSetArg(args[ac], XmNy, 159); ac++;
    XtSetArg(args[ac], XmNwidth, 71); ac++;
    XtSetArg(args[ac], XmNheight, 142); ac++;
    _pbPlusMinus = XmCreatePushButton(_CUItextnumentry,
        "pbPlusMinus",
        args, 
        ac);
    XtManageChild(_pbPlusMinus);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pbPlusMinus,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, ".", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 143); ac++;
    XtSetArg(args[ac], XmNy, 371); ac++;
    XtSetArg(args[ac], XmNwidth, 72); ac++;
    XtSetArg(args[ac], XmNheight, 71); ac++;
    _pbDot = XmCreatePushButton(_CUItextnumentry,
        "pbDot",
        args, 
        ac);
    XtManageChild(_pbDot);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pbDot,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, "9", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 143); ac++;
    XtSetArg(args[ac], XmNy, 159); ac++;
    XtSetArg(args[ac], XmNwidth, 72); ac++;
    XtSetArg(args[ac], XmNheight, 71); ac++;
    _pb9 = XmCreatePushButton(_CUItextnumentry,
        "pb9",
        args, 
        ac);
    XtManageChild(_pb9);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pb9,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, "8", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 72); ac++;
    XtSetArg(args[ac], XmNy, 159); ac++;
    XtSetArg(args[ac], XmNwidth, 71); ac++;
    XtSetArg(args[ac], XmNheight, 71); ac++;
    _pb8 = XmCreatePushButton(_CUItextnumentry,
        "pb8",
        args, 
        ac);
    XtManageChild(_pb8);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pb8,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, "7", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 0); ac++;
    XtSetArg(args[ac], XmNy, 159); ac++;
    XtSetArg(args[ac], XmNwidth, 72); ac++;
    XtSetArg(args[ac], XmNheight, 71); ac++;
    _pb7 = XmCreatePushButton(_CUItextnumentry,
        "pb7",
        args, 
        ac);
    XtManageChild(_pb7);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pb7,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, "6", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 143); ac++;
    XtSetArg(args[ac], XmNy, 230); ac++;
    XtSetArg(args[ac], XmNwidth, 72); ac++;
    XtSetArg(args[ac], XmNheight, 71); ac++;
    _pb6 = XmCreatePushButton(_CUItextnumentry,
        "pb6",
        args, 
        ac);
    XtManageChild(_pb6);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pb6,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, "5", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 72); ac++;
    XtSetArg(args[ac], XmNy, 230); ac++;
    XtSetArg(args[ac], XmNwidth, 71); ac++;
    XtSetArg(args[ac], XmNheight, 71); ac++;
    _pb5 = XmCreatePushButton(_CUItextnumentry,
        "pb5",
        args, 
        ac);
    XtManageChild(_pb5);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pb5,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, "4", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 0); ac++;
    XtSetArg(args[ac], XmNy, 230); ac++;
    XtSetArg(args[ac], XmNwidth, 72); ac++;
    XtSetArg(args[ac], XmNheight, 71); ac++;
    _pb4 = XmCreatePushButton(_CUItextnumentry,
        "pb4",
        args, 
        ac);
    XtManageChild(_pb4);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pb4,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, "3", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 143); ac++;
    XtSetArg(args[ac], XmNy, 301); ac++;
    XtSetArg(args[ac], XmNwidth, 72); ac++;
    XtSetArg(args[ac], XmNheight, 70); ac++;
    _pb3 = XmCreatePushButton(_CUItextnumentry,
        "pb3",
        args, 
        ac);
    XtManageChild(_pb3);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pb3,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, "2", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 72); ac++;
    XtSetArg(args[ac], XmNy, 301); ac++;
    XtSetArg(args[ac], XmNwidth, 71); ac++;
    XtSetArg(args[ac], XmNheight, 70); ac++;
    _pb2 = XmCreatePushButton(_CUItextnumentry,
        "pb2",
        args, 
        ac);
    XtManageChild(_pb2);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pb2,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, "1", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 0); ac++;
    XtSetArg(args[ac], XmNy, 301); ac++;
    XtSetArg(args[ac], XmNwidth, 72); ac++;
    XtSetArg(args[ac], XmNheight, 70); ac++;
    _pb1 = XmCreatePushButton(_CUItextnumentry,
        "pb1",
        args, 
        ac);
    XtManageChild(_pb1);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pb1,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNlabelString, 
        BX_CONVERT(parent, "0", 
        XmRXmString, 0, &argok)); if (argok) ac++;
    XtSetArg(args[ac], XmNx, 0); ac++;
    XtSetArg(args[ac], XmNy, 371); ac++;
    XtSetArg(args[ac], XmNwidth, 143); ac++;
    XtSetArg(args[ac], XmNheight, 71); ac++;
    _pb0 = XmCreatePushButton(_CUItextnumentry,
        "pb0",
        args, 
        ac);
    XtManageChild(_pb0);
    _clientDataStructs = new UICallbackStruct;
    _clientDataStructs->object = this;
    _clientDataStructs->client_data = (XtPointer)0;
    XtAddCallback(_pb0,
        XmNactivateCallback,
        CUItextnumentry::vButtonCBCallback,
        (XtPointer)_clientDataStructs);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 0); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 20); ac++;
    XtSetArg(args[ac], XmNleftPosition, 45); ac++;
    XtSetArg(args[ac], XmNrightPosition, 55); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_lbDecimal, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 0); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 10); ac++;
    XtSetArg(args[ac], XmNleftPosition, 91); ac++;
    XtSetArg(args[ac], XmNrightPosition, 100); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abUp10, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 0); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 10); ac++;
    XtSetArg(args[ac], XmNleftPosition, 82); ac++;
    XtSetArg(args[ac], XmNrightPosition, 91); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abUp9, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 0); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 10); ac++;
    XtSetArg(args[ac], XmNleftPosition, 73); ac++;
    XtSetArg(args[ac], XmNrightPosition, 82); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abUp8, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 0); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 10); ac++;
    XtSetArg(args[ac], XmNleftPosition, 64); ac++;
    XtSetArg(args[ac], XmNrightPosition, 73); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abUp7, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 0); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 10); ac++;
    XtSetArg(args[ac], XmNleftPosition, 55); ac++;
    XtSetArg(args[ac], XmNrightPosition, 64); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abUp6, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 0); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 10); ac++;
    XtSetArg(args[ac], XmNleftPosition, 36); ac++;
    XtSetArg(args[ac], XmNrightPosition, 45); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abUp5, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 10); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 20); ac++;
    XtSetArg(args[ac], XmNleftPosition, 91); ac++;
    XtSetArg(args[ac], XmNrightPosition, 100); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abDown10, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 10); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 20); ac++;
    XtSetArg(args[ac], XmNleftPosition, 82); ac++;
    XtSetArg(args[ac], XmNrightPosition, 91); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abDown9, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 10); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 20); ac++;
    XtSetArg(args[ac], XmNleftPosition, 73); ac++;
    XtSetArg(args[ac], XmNrightPosition, 82); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abDown8, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 10); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 20); ac++;
    XtSetArg(args[ac], XmNleftPosition, 64); ac++;
    XtSetArg(args[ac], XmNrightPosition, 73); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abDown7, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 10); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 20); ac++;
    XtSetArg(args[ac], XmNleftPosition, 55); ac++;
    XtSetArg(args[ac], XmNrightPosition, 64); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abDown6, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 10); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 20); ac++;
    XtSetArg(args[ac], XmNleftPosition, 36); ac++;
    XtSetArg(args[ac], XmNrightPosition, 45); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abDown5, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 20); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 36); ac++;
    XtSetArg(args[ac], XmNleftPosition, 25); ac++;
    XtSetArg(args[ac], XmNrightPosition, 50); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_pbRecall, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 20); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 36); ac++;
    XtSetArg(args[ac], XmNleftPosition, 75); ac++;
    XtSetArg(args[ac], XmNrightPosition, 100); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_pbDelete, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 0); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 10); ac++;
    XtSetArg(args[ac], XmNleftPosition, 27); ac++;
    XtSetArg(args[ac], XmNrightPosition, 36); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abUp4, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 10); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 20); ac++;
    XtSetArg(args[ac], XmNleftPosition, 27); ac++;
    XtSetArg(args[ac], XmNrightPosition, 36); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abDown4, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 10); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 20); ac++;
    XtSetArg(args[ac], XmNleftPosition, 18); ac++;
    XtSetArg(args[ac], XmNrightPosition, 27); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_abDown3, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 0); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 10); ac++;
    XtSetArg(args[ac], XmNleftPosition, 18); ac++;
    XtSetArg(args[ac], XmNrightPosition, 27); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_abUp3, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 20); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 36); ac++;
    XtSetArg(args[ac], XmNleftPosition, 0); ac++;
    XtSetArg(args[ac], XmNrightPosition, 25); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_pbCancel, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 20); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 36); ac++;
    XtSetArg(args[ac], XmNleftPosition, 50); ac++;
    XtSetArg(args[ac], XmNrightPosition, 75); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_pbClear, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 10); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 20); ac++;
    XtSetArg(args[ac], XmNleftPosition, 9); ac++;
    XtSetArg(args[ac], XmNrightPosition, 18); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_abDown2, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 0); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 10); ac++;
    XtSetArg(args[ac], XmNleftPosition, 9); ac++;
    XtSetArg(args[ac], XmNrightPosition, 18); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_abUp2, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 10); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 20); ac++;
    XtSetArg(args[ac], XmNleftPosition, 0); ac++;
    XtSetArg(args[ac], XmNrightPosition, 9); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_abDown1, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 0); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 10); ac++;
    XtSetArg(args[ac], XmNleftPosition, 0); ac++;
    XtSetArg(args[ac], XmNrightPosition, 9); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_abUp1, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 68); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 100); ac++;
    XtSetArg(args[ac], XmNleftPosition, 75); ac++;
    XtSetArg(args[ac], XmNrightPosition, 100); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_pbEnter, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 36); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 68); ac++;
    XtSetArg(args[ac], XmNleftPosition, 75); ac++;
    XtSetArg(args[ac], XmNrightPosition, 100); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_pbPlusMinus, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 84); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 100); ac++;
    XtSetArg(args[ac], XmNleftPosition, 50); ac++;
    XtSetArg(args[ac], XmNrightPosition, 75); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_pbDot, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 36); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 52); ac++;
    XtSetArg(args[ac], XmNleftPosition, 50); ac++;
    XtSetArg(args[ac], XmNrightPosition, 75); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_pb9, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 36); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 52); ac++;
    XtSetArg(args[ac], XmNleftPosition, 25); ac++;
    XtSetArg(args[ac], XmNrightPosition, 50); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_pb8, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 36); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 52); ac++;
    XtSetArg(args[ac], XmNleftPosition, 0); ac++;
    XtSetArg(args[ac], XmNrightPosition, 25); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_pb7, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 52); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 68); ac++;
    XtSetArg(args[ac], XmNleftPosition, 50); ac++;
    XtSetArg(args[ac], XmNrightPosition, 75); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_pb6, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 52); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 68); ac++;
    XtSetArg(args[ac], XmNleftPosition, 25); ac++;
    XtSetArg(args[ac], XmNrightPosition, 50); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_pb5, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 52); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 68); ac++;
    XtSetArg(args[ac], XmNleftPosition, 0); ac++;
    XtSetArg(args[ac], XmNrightPosition, 25); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_pb4, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 68); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 84); ac++;
    XtSetArg(args[ac], XmNleftPosition, 50); ac++;
    XtSetArg(args[ac], XmNrightPosition, 75); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_pb3, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 68); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 84); ac++;
    XtSetArg(args[ac], XmNleftPosition, 25); ac++;
    XtSetArg(args[ac], XmNrightPosition, 50); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_pb2, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 68); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 84); ac++;
    XtSetArg(args[ac], XmNleftPosition, 0); ac++;
    XtSetArg(args[ac], XmNrightPosition, 25); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNrightOffset, 0); ac++;
    XtSetValues(_pb1, args, ac);
    
    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_POSITION); ac++;
    XtSetArg(args[ac], XmNtopPosition, 84); ac++;
    XtSetArg(args[ac], XmNbottomPosition, 100); ac++;
    XtSetArg(args[ac], XmNleftPosition, 0); ac++;
    XtSetArg(args[ac], XmNrightPosition, 50); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0); ac++;
    XtSetArg(args[ac], XmNleftOffset, 0); ac++;
    XtSetValues(_pb0, args, ac);
    
    // Begin user code block <endcreate> 
    // End user code block <endcreate> 
}

//
// Classname access.
//
const char *const CUItextnumentry::className()
{
    return ("CUItextnumentry");
}

void CUItextnumentry::vButtonCBCallback(Widget w, 
		XtPointer clientData, XtPointer callData)
{
    UICallbackStruct *data = (UICallbackStruct *) clientData;
    CUItextnumentry *obj = (CUItextnumentry *)data->object;
    obj->vButtonCB(w, data->client_data, callData);
}

void CUItextnumentry::vButtonCB (Widget w, XtPointer clientData, XtPointer callData)
{
    
    // Begin user code block <vButtonCB> 
  int  i;
  bool bUpdateNumber = TRUE;
  bool bUnmanage     = FALSE;
  if (w == _pbCancel)
    {
      XmTextFieldSetString(m_wTextField, m_sTextOrig.string());
      bUnmanage     = TRUE;
      bUpdateNumber = FALSE;
    }
  else if (XmIsArrowButton(w))
    {
      // Which arrow button is it?
      
      for (i = 0; i < 20; i++)
	{
	  if (w == *(m_apwArrowButtons[i]))
	    break;
	}
      if (20 <= i) return;  // Unknown arrow button
      if (9 < i)
	m_dNumber = m_dNumber - m_dIncrement[i-10];
      else
	m_dNumber = m_dNumber + m_dIncrement[i];
    }
  else if (w == _pbRecall)
    {
      m_dNumber = m_dNumberOrig;
    }
  else if (w == _pbDelete)
    {
      // Delete last character from the text widget
    }
  else if (w == _pbEnter)
    {
      bUpdateNumber = FALSE;
      bUnmanage     = TRUE;
    }
  else if (w == _pbClear)
    {
      bUpdateNumber = TRUE;
      m_dNumber = 0.0;
      XmTextFieldSetString(m_wTextField, "");
    }
  else if (w == _pbPlusMinus)
    {
      m_dNumber = -m_dNumber;
    }

  if (bUpdateNumber)
    {
      char a255cTemp[255];
      sprintf(a255cTemp, m_sFormat.string(), m_dNumber);
      m_sTextCurr = a255cTemp;
      XmTextFieldSetString(m_wTextField, m_sTextCurr.string());
    }
  if (bUnmanage)
    {
      XtUnmanageChild(baseWidget());
    }

    // End user code block <vButtonCB> 
}

// Begin user code block <tail> 
void CUItextnumentry::vSetTextField(Widget w)
{
  char *pcTemp;

  if (!XmIsTextField(w)) return;
  m_wTextField = w;

  pcTemp = XmTextFieldGetString(w);
  m_sTextOrig = pcTemp;
  m_sTextCurr = m_sTextOrig;
  XtFree(pcTemp);

  int nDecimal;
  int nStat;
  int i;

  // See how many decimal
  // places there are and use that to determine how the arrow buttons work
  
  nDecimal     = m_sTextOrig.find('.');
  if (0 > nDecimal)
    {
      nDecimal = 0;
    }
  else
    {
      nDecimal = m_sTextOrig.length() - nDecimal - 1;
      if (0 > nDecimal) nDecimal = 0;
    }

  // Figure out which arrow buttons to manage/unmanage

  for (i = 5; i < 10; i++)
    {
      if ((i - 5) < nDecimal)
	{
	  XtManageChild(*(m_apwArrowButtons[i]));
	  XtManageChild(*(m_apwArrowButtons[i+10]));
	}
      else
	{
	  XtUnmanageChild(*(m_apwArrowButtons[i]));
	  XtUnmanageChild(*(m_apwArrowButtons[i+10]));
	}
    }

  // Figure out format string to use when updating textfield widget

  m_sFormat = (Cstring)"%." + (Cstring) nDecimal + "lf";
  nStat = sscanf(m_sTextOrig.string(), "%lf", &m_dNumberOrig);
//  cout << "nDecimal = " << i << " Number = " << m_dNumberOrig << endl;
  m_dNumber = m_dNumberOrig;

  if (1 != nStat) return;

  // TODO:
  // Compute where to manage the widget (maybe should be a pop-up!)

  manage();
}
// End user code block <tail> 
